Recording method and recording apparatus

ABSTRACT

A recording method is provided for recording data into an information recording medium, in which the number of data rewrites into the same area is limited. The recording method comprises the steps of (a) performing a search for unallocated areas in an information recording area and retaining, in a memory, unallocated area identifying information for identifying at least one unallocated area found by the search, (b) determining whether or not an unallocated area satisfying a record request is present among the at least one unallocated areas identified by the unallocated area identifying information, and (c) when an unallocated area satisfying a record request is present among the at least one unallocated areas identified by the unallocated area identifying information, allocating the unallocated area as an area for recording data and recording data into the allocated area.

TECHNICAL FIELD

The present invention relates to a recording method and recordingapparatus for recording data onto an information recording medium whichhas a limitation on the number of data rewrites in the same area.

BACKGROUND ART

Optical discs are information recording media having a sector structure.Recently, the density and capacity of optical discs are becoming higherand higher. There is also an increasing demand for an improvement inphysical characteristics of optical discs. In particular, if an opticaldisc has a limitation on the number of data rewrites in the same area,it is necessary to avoid repeated recording of data into a particulararea of the optical disc. In order to avoid the repeated recording ofdata, a sequential recording method has been studied.

FIG. 14 is a diagram for explaining the principle of the sequentialrecording method.

In an example shown in FIG. 14, for the sake of simplicity, aninformation recording area on an optical disc is divided into 6 areas(A1 to A6). It is assumed that one hour of video data can be recorded ineach of the 6 areas (A1 to A6) and the allowable number of rewrites onthe optical disc (cycleability) is 1,000. For example, when 10-Mbps(Mega Bits/Second) video data is recorded onto a 27-GB (Giga Byte)optical disc, about 6 hours of video data can be recorded onto theoptical disc.

A portion (a) of FIG. 14 shows a recording operation in which one hourof video data is repeatedly recorded into the area A1 1,000 times. Aportion (b) of FIG. 14 shows a state of an optical disc that as a resultof the recording operation of a portion (a) of FIG. 14, the area A1 isdisabled due to rewrite fatigue attributed to physical characteristicsof the optical disc. Since the area A1 is disabled, only 5 hours ofvideo data can be recorded onto the optical disc which could otherwisestore 6 hours of video data.

A portion (c) of FIG. 14 shows a sequential recording operation. In thesequential recording operation, video data is recorded in each area inorder from the area A1 to the area A6; when the recording of video datareaches the end of the information recording area (i.e., the end of thearea A6), the recording of video data returns to the start of theinformation recording area (i.e., the start of the area A1) andcontinues in order from the area A1 to the area A6.

A portion (d) of FIG. 14 shows a state of the optical disc that videodata is rewritten into each of the area A1 to the area A6 167 times as aresult of the sequential recording operation of the portion (c) of FIG.14. Thus, the sequential recording operation averages the number ofrewrites over the entire information recording area, thereby making itpossible to reduce rewrite fatigue per area (e.g., per sector). As aresult, even if one hour of video data is recorded 1,000 times, the timelength of video data which can be recorded onto the optical disc is notreduced.

A data processing apparatus is known, in which an address indicating thestarting position of a search for unallocated areas is recorded on anoptical disc and an unallocated area (blank area) is searched for fromthe position indicated by the address in a direction from the inner areato the outer area of the optical disc (e.g., see Japanese Laid-OpenPublication No. 4-120634).

However, in the case of applications in which a large volume of data,such as audio data or video data, is recorded, when rewrite isconcentrated, such as repeated on the same area, a large area is nolonger available. Therefore, there has been a demand for a recordingmethod for avoiding the concentration of rewrites as maximally aspossible. An information recording medium supporting defect management(e.g., a linear replacement method, etc.) has a problem that when theamount of disabled area is increased, a defect management listoverflows, so that a defect management mechanism possessed by arecording apparatus (e.g., a drive, etc.) cannot work. Particularly, inthe above-described conventional apparatuses, since data deletion is nottaken into consideration, rewrite operations are likely to occur in datadeleted areas. Further, since ECC blocks are not taken intoconsideration, rewrite operations disadvantageously occur in ECC blockscontaining the end positions of data-recorded areas. Furthermore, sincea specialized address indicating the starting position of a search forunallocated areas has to be recorded on an optical disc, a file systemwhich does not have such a specialized address (e.g., an existingstandard file system (e.g., UDF™ issued by OSTA, etc.) cannot handle theoptical disc.

The present invention is provided to solve at least one of theabove-described problems.

DISCLOSURE OF THE INVENTION

The present invention provides a recording method for recording datainto an information recording medium, wherein the number of datarewrites into the same area is limited, the recording method comprisingthe steps of: (a) performing a search for unallocated areas in aninformation recording area and retaining, in a memory, unallocated areaidentifying information for identifying at least one unallocated areafound by the search; (b) determining whether or not an unallocated areasatisfying a record request is present among the at least oneunallocated areas identified by the unallocated area identifyinginformation; and (c) when an unallocated area satisfying a recordrequest is present among the at least one unallocated areas identifiedby the unallocated area identifying information, allocating theunallocated area as an area for recording data and recording data intothe allocated area. Thereby, the above-described object can be achieved.

The recording method may further comprise the steps of: (d) when anunallocated area satisfying a record request is not present among the atleast one unallocated areas identified by the unallocated areaidentifying information, returning to step (a).

The recording method may further comprises the steps of: (e) searchingfor a new file recorded in the information recording area; and (f)generating a pointer indicating a position based on an end position ofan area in which the new file is recorded. The search for unallocatedareas in the information recording area in step (a) may be performed ina fixed direction from a position following the position indicated bythe pointer.

The data may be recorded into the information recording medium on an ECCblock-by-ECC block basis, the ECC block may comprise a plurality ofsectors, and the search for unallocated areas in the informationrecording area may be performed on an ECC block-by-ECC block basis.

The pointer may indicate an end position of an ECC block containing theend position of the area in which the new file is recorded.

Step (e) may comprise searching files recorded in the informationrecording medium for a file having the newest file creation time ormodification time as the new file.

Step (e) may comprise searching files recorded in the informationrecording medium for a file having the largest ID number assigned to thefile as the new file.

Step (e) may comprise searching files recorded in a particular directoryfor a file most recently recorded in the information recording medium asthe new file.

Step (e) may comprise searching for an index file as the new file,wherein the index file is used to manage information about a list offiles recorded in the information recording medium.

The recording method may further comprises the steps of: (g) updatingthe index file when data recorded in the information recording medium isdeleted or when the information recording medium is formatted; and (h)recording the updated index file into the area allocated in step (c).

The recording method may further comprise the step of: (i) generating apointer indicating a random position in the information recording area.The search for unallocated areas in the information recording area instep (a) may be performed from a position following the positionindicated by the pointer in a fixed direction.

The search for unallocated areas in the information recording area instep (a) may be performed from a start of the information recording areain a fixed direction.

A recording apparatus of the present invention is provided for recordingdata into an information recording medium, in which the number of datarewrites into the same area is limited. The recording apparatuscomprises: a holding section for performing a search for unallocatedareas in an information recording area and retaining, in a memory,unallocated area identifying information for identifying at least oneunallocated area found by the search; a determining section fordetermining whether or not an unallocated area satisfying a recordrequest is present among the at least one unallocated areas identifiedby the unallocated area identifying information; and a recording sectionfor, when an unallocated area satisfying a record request is presentamong the at least one unallocated areas identified by the unallocatedarea identifying information, allocating the unallocated area as an areafor recording data and recording data into the allocated area. Thereby,the above-described object can be achieved.

When an unallocated area satisfying a record request is not presentamong the at least one unallocated areas identified by the unallocatedarea identifying information, the holding section may perform a searchfor unallocated areas in the information recording area and retains, inthe memory, unallocated area identifying information for identifying atleast one unallocated area found by the search.

In the recording method of the present invention, a new search forunallocated areas is not performed until all of at least one unallocatedarea found by the previous search for unallocated areas is used.Thereby, it is possible to avoid concentration of rewrites in aparticular area while avoiding rewriting data into an area from whichdata has been deleted. In addition, by performing a search forunallocated areas from a sector following the end position of an ECCblock, containing the end position of an area in which data is recorded,on an ECC block-by-ECC block basis, it is possible to prevent rewritingof an ECC block containing the end position of an area, in which data isrecorded, in an information recording medium into which data is recordedusing ECC blocks.

Further, by searching a new file and generating a pointer indicating aposition, from which a search for unallocated areas begins, based oninformation, such as file management information or the like, it ispossible to implement a sequential recording method even in an existingstandard file system in which a data structure for recording aspecialized address indicating a position from which a search forunallocated areas begins is not defined. In addition, when datarecordings and deletions are carried out a large number of times, apointer indicating a random position in an information recording mediumis generated using a random number, and a search for unallocated areasis started from a position following the position indicated by thepointer. In this case, it is possible to avoid concentration of datarecordings and deletions into a particular area even in an existingstandard file system in which a data structure for recording aspecialized address indicating a position from which a search forunallocated areas begins. Particularly, it is possible to avoid rewritefatigue of sectors when large-size data, such as audio data or videodata, is recorded, and it is possible to reduce the effort of the defectmanagement mechanism of a drive for a disc supporting defect management.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram for explaining an outline of a recording methodaccording to the present invention.

FIG. 2 is a diagram for explaining a difference between a recordingmethod of the present invention and a conventional recording method.

FIG. 3 is a diagram showing recording methods when data is recorded intofour consecutive ECC blocks (Ei, Ei+1, Ei+2, Ei+3).

FIG. 4 is a flowchart showing steps of a recording method of the presentinvention.

FIG. 5 shows an exemplary configuration of an informationrecording/reproduction apparatus according to the present invention.

FIG. 6 shows an exemplary structure of files recorded on an informationrecording medium.

FIG. 7 shows a data structure of a file structure of FIG. 6 in a formatunder the standard ISO/IEC13346.

FIG. 8 is a diagram for explaining a recording method in which a pointerindicating a position other than the end position of file recording isgenerated and data is recorded onto an information recording mediumusing the pointer.

FIG. 9 is a diagram for explaining a recording method using an indexfile.

FIG. 10 is a diagram showing the internal structure of a typical flashmemory card.

FIG. 11 is a diagram showing a correspondence relationship between alogical space and a physical space comprising physical blocks of a flashmemory card provided to the system control section 501.

FIG. 12 is a diagram showing a correspondence relationship between alogical space and a physical space of a flash memory card when largedata, such as video data, is recorded onto the flash memory card.

FIG. 13 is a diagram showing a difference between a recording method ofthe present invention and a conventional recording method with respectto flash memory cards.

FIG. 14 is a diagram for explaining the principle of a conventionalrecording method.

BEST MODE FOR CARRYING OUT THE INVENTION

Hereinafter, the present invention will be described by way ofillustrative examples with reference to the accompanying drawings.

EXAMPLE 1

FIG. 1 is a diagram for explaining an outline of a recording methodaccording to the present invention. The recording method can be used torecord data into an information recording area on an informationrecording medium (e.g., an optical disc, etc.).

In the example shown in FIG. 1, for the sake of simplicity, aninformation recording area is divided into six areas (areas A1 to A6).The areas A1 to A6 each comprise at least one sector. Sector numbers areincreased from the left to the right in FIG. 1. It is assumed that datais managed sector by sector on the information recording medium.

A portion (a) of FIG. 1 shows a state of the information recordingmedium where no data is recorded in the information recording area. Inthis state, the areas A1 to A6 are all unallocated areas. A search foran unallocated area is performed from a predetermined position (e.g.,the start of the information recording area) in a fixed direction (e.g.,a direction from a sector having a small sector number to a sectorhaving a large sector number). As a result, each of the areas A1 to A6is found as an unallocated area. Unallocated area identifyinginformation for identifying the areas A1 to A6 as unallocated areas(e.g., a list of identifiers for the areas A1 to A6) is retained in amemory (not shown). As such a memory, any type of memory may be employedthat is used in a recording apparatus (not shown) for recording dataonto an information recording medium. It should be noted that the searchfor unallocated areas is performed using data having a file structurewhich is used in a file system, such as UDF or the like (the detailswill be described below).

A portion (b) of FIG. 1 shows a state of the information recordingmedium where the unallocated areas A1 to A6 are each allocated as anarea for recording data and data is recorded into each area in orderfrom a sector having a small sector number to a sector having a largesector number. In FIG. 1, data is represented by Di (i=1, 2, 3, . . . ),where a suffix indicates the ordinal position of recorded data from theleast current to the most current.

A portion (c) of FIG. 1 shows a state of the information recordingmedium in which data D1 and D2 are deleted from the state of the portion(b) of FIG. 1. It is assumed that this state receives a record request“Record data D7 and D8”. In this case, since there is no remainingunallocated area which is identified by the unallocated area identifyinginformation stored in the memory, a search for unallocated areas isperformed from a predetermined position (e.g., the start of theinformation recording area) in a fixed direction (e.g., a direction froma sector having a small sector number to a sector having a large sectornumber). As a result, the areas A1 and A2 are found as unallocatedareas. Unallocated area identifying information for identifying theareas A1 and A2 as unallocated areas (e.g., a list of identifiers forthe areas A1 and A2) is retained in the memory. It should be noted thatsince data is managed as a file, data deletion is carried out bydeleting a file from a corresponding directory. Such a deletionoperation is not that null data is recorded in an area in which data hasbeen recorded, for example.

A portion (d) of FIG. 1 shows a state of the information recordingmedium where the unallocated areas A1 and A2 are allocated as areas forrecording data and data D7 and D8 are recorded into the allocated areasA1 and A2, respectively.

A portion (e) of FIG. 1 shows a state of the information recordingmedium where data D7, D3, and D5 are deleted from the state of theportion (d) of FIG. 1. The data deletion is carried out in accordancewith a user's instruction.

A portion (f) of FIG. 1 shows the information recording medium which isloaded into another recording apparatus. In this case, a search forunallocated areas is performed from a predetermined position (e.g., thestart of the area A3 following the area A2 in which the newest file dataD8 has been recorded) in a fixed direction (e.g., a direction from asector having a small sector number to a sector having a large sectornumber). As a result, the areas A3 and A5 are found as unallocatedareas. Unallocated area identifying information for specifying the areasA3 and A5 found as unallocated areas (e.g., a list of identifiers forthe areas A3 and A5) is retained in a memory (not shown). As such amemory, any type of memory may be employed that is used in the recordingapparatus (not shown) into which the information recording medium hasbeen newly loaded.

A portion (g) of FIG. 1 shows a state of the information recordingmedium where the unallocated area A3 is allocated as an area forrecording data and data D9 is recorded into the allocated area A3, andthereafter, data D4 is deleted.

A portion (h) of FIG. 1 shows a state of the information recordingmedium where the unallocated area A5 is allocated as an area forrecording data and data D10 is recorded into the allocated area A5. Inthe recording method of the present invention, the data D10 is notrecorded into the area A4 in which the data D4 has been deleted.According to the recording method of the present invention, onceunallocated area identifying information has been retained in a memory,an unallocated area specified by the unallocated area identifyinginformation is used until all of the unallocated area(s) in theunallocated area identifying information are used. As a result, whendata is deleted after a search for unallocated areas has been performed,an unallocated area found by the search is used to record data withhigher precedence than an unallocated area generated by the datadeletion.

A portion (i) of FIG. 1 shows a state of the information recordingmedium when the unallocated areas A3 and A5, which had been found in thesearch of the portion (f) of FIG. 1, have already been used, and sothere is a lack of unallocated areas. In this case, a search forunallocated areas is performed from a predetermined position (e.g., thestart of the information recording area) in a fixed direction (e.g., adirection from a sector having a small sector number to a sector havinga large sector number). As a result, the areas A1 and A4 are found asunallocated areas. Unallocated area identifying information foridentifying the areas A1 and A4, found as unallocated areas, (e.g., alist of identifiers for the areas A1 and A4) is retained in a memory.

A portion (j) of FIG. 1 shows a state of the information recordingmedium where the unallocated area A1 is allocated as an area forrecording data and data D11 is recorded into the allocated area A1.

FIG. 2 is a diagram for explaining a difference between a recordingmethod of the present invention and a conventional recording method.Portions (a) to (c) of FIG. 2 show the recording method of the presentinvention. Portions (d) to (f) of FIG. 2 show the conventional recordingmethod.

The portion (a) of FIG. 2 shows a state of an information recordingmedium where it is loaded into a recording apparatus. Data D8, D4, andD6 are recorded in areas A1, A2, and A3, respectively. The data D8 isthe newest file. Therefore, a search for unallocated areas is performedfrom the start of the area A2 following the area A1 into which thenewest file has been recorded. As a result, the areas A4, A5, and A6 arefound as unallocated areas.

The portion (b) of FIG. 2 shows a state of the information recordingmedium where the data files D4 and D6 are deleted from the state of theportion (a) of FIG. 2.

The portion (c) of FIG. 2 shows a state of the information recordingmedium that the unallocated areas A4, A5, and A6 are allocated as areasfor recording data, and data D9, D10, and D11 are recorded into theallocated areas A4, A5, and A6, respectively.

On the other hand, in the conventional recording method, the state of aninformation recording medium loaded into a recording apparatus (theportion (d) of FIG. 2) is the same as that which is shown in the portion(a) of FIG. 2. However, since a search for unallocated areas isperformed immediately before data recording, areas A2 and A3 from whichdata files D4 and D6 have been deleted are identified as unallocatedareas (the portion (e) of FIG. 2). As a result, data D9, D10, and D11are recorded into the areas A2, A3, and A4, respectively (the portion(f) of FIG. 2).

In the recording method of the present invention, data is recorded intoan area while avoiding areas from which data has been deleted. Incontrast, data is recorded into an area from which data has been deletedin the conventional recording method.

In the recording method of the present invention, a new search forunallocated areas is performed at the time when none of the unallocatedareas found by the previous search remains. When data is deleted after asearch for unallocated areas has been performed, an unallocated areafound by the search is used to record data with higher precedence thanan unallocated area generated by the data deletion. Thereby, data can berecorded into an area while avoiding areas from which data has beendeleted. As a result, the number of rewrites to the same area can bereduced.

The idea of the recording method of the present invention is based onthe idea of the conventional recording method, but differs from theconventional recording method in that no new search for unallocatedareas is performed until all unallocated areas which have been found bythe previous search are exhausted. Thus, the present invention providesa novel recording method.

Alternatively, the positions of areas from which data has been deletedmay be retained, and the areas from which data has been deleted are notused until all unallocated areas in the information recording area of aninformation recording medium are used. By such a recording method, thesame effect as that of the above-described recording method can beobtained.

Next, a recording method will be described, in which data is recorded onan ECC block-by-ECC block basis where each ECC block comprises aplurality of sectors. In the case of an optical disc DVD, an ECC blockcomprises 16 sectors, each of which is given an ECC (Error CorrectionCode). Data is recorded on an ECC block-by-ECC block basis. As thedensity and capacity of optical discs are increased, the number ofsectors in an ECC block tends to be increased.

The consideration of ECC block is important, because in case of DVD discon a sector-by-sector basis recording and an ECC block-by-ECC blockbasis recording into an ECC block the number of rewrites is 16 and 1,respectively.

FIG. 3 is a diagram showing recording methods when data is recorded intofour consecutive ECC blocks (Ei, Ei+1, Ei+2, Ei+3).

Portions (a) and (b) of FIG. 3 show a state of an information recordingmedium where data is recorded thereonto by the recording method of thepresent invention. Portions (c) and (d) of FIG. 3 show a state of aninformation recording medium where data is recorded thereonto by aconventional recording method.

As shown in the portion (a) of FIG. 3, the last portion of data D8 isrecorded in an ECC block Ei and a part of an ECC block Ei+1. In thiscase, the recording method of the present invention generates a pointerwhich indicates the end position of the ECC block Ei+1 containing theend position of the area in which the new file data D8 has been recorded(i.e., the position of the last sector of the ECC block Ei+1). As shownin the portion (b) of FIG. 3, a search for unallocated areas isperformed from a sector following the position indicated by the pointerin the recording method of the present invention. As a result, data D9is recorded into an area beginning from the start of the ECC block Ei+2.

As shown in the portion (c) of FIG. 3, the last portion of the data D8is recorded in the ECC block Ei and a part of the ECC block Ei+1. Inthis case, the conventional recording method generates a pointerindicating the end position of an area in which the new file data D8 hasbeen recorded. As shown in the portion (d) of FIG. 3, in theconventional recording method, a search for unallocated areas isperformed from a sector following a position indicated by the pointer.Thereafter, in order to record new data D9 into an unallocated areafound by the search, the data D8 recorded in the ECC block Ei+1 is readout; a new ECC block is generated from data at the end of the data D8and data at the start of the data D9; and the newly generated ECC blockis recorded as ECC block Hi+1. Therefore, a rewrite operation occurswith respect to the ECC block Ei+1 in which data has already beenrecorded.

Thus, in the recording method of the present invention, a search forunallocated areas begins from a sector following an ECC block containingthe end position of an area into which data has been most recentlyrecorded (i.e., a search for unallocated areas begins from a borderbetween ECC blocks) Thereby, it is possible to prevent a rewriteoperation from occurring in an ECC block containing the end position ofan area in which data has been recorded. Moreover, in the recordingmethod of the present invention, it is possible to prevent a rewriteoperation from occurring in an ECC block containing the start or end ofconsecutive areas storing data by searching for unallocated areas on anECC block-by-ECC block basis. Thereby, it is possible to prevent arewrite operation from concentrating into a particular area and todisperse areas in which a rewrite operation occurs.

FIG. 4 is a flowchart showing steps of the recording method of thepresent invention.

Before recording data, a new file is searched for in order to generate apointer indicating a position from which a search for unallocated areasbegins (step S1). It should be noted that the term “new file” usedherein refers to a file which has been most recently recorded onto aninformation recording medium.

Next, a pointer indicating a position based on the end position of anarea in which new file data has been recorded is generated (step S2).For example, in the case of an information recording medium into whichdata is recorded on an ECC block-by-ECC block basis, a data pointerindicating the end position of an ECC block containing the end positionof an area which the new file data has been recorded is generated.

Next, a search for unallocated areas is performed in a fixed directionfrom a position following the position indicated by the pointer. In thiscase, the fixed direction is a direction from a sector having a smallsector number to a sector having a large sector number. Unallocated areaidentifying information for specifying at least one unallocated areafound by the search is retained in a memory (not shown) (step S3).

Next, it is determined whether or not the at least one unallocated areaidentified by the unallocated area identifying information is inadequate(step S4). When the result of the determination in step S4 is “Yes”, theprocess goes to step S2. When the result of the determination in step S4is “No”, the process goes to step S5. For example, when receiving arecord request “Record new data Di”, it is determined whether or notthere remains an unused unallocated area for satisfying the recordrequest among at least one unallocated area identified by theunallocated area identifying information. When there remain no unusedunallocated areas (i.e., all of the at least one unallocated areasidentified by the unallocated area identifying information have alreadybeen used), the process goes to step S2. When there remains an unusedunallocated area, the process goes to step S5.

Next, an unallocated area is allocated as an area for recording the newdata Di, and the new data Di is recorded into the allocated area (stepS5).

After recording of the data, the process is stopped if an instructionfor ejecting the information recording medium is received. Otherwise,the process continues and goes to step S4 (step S6).

It should be noted that although the flowchart is directed to arecording method, file deletion or file reading may be carried outduring the recording method.

It should be noted that a position from which a search for unallocatedareas begins is not limited to a position following a position indicatedby a pointer. A position from which a search for unallocated areasbegins may be any position in an information recording area. Forexample, a position from which a search for unallocated areas begins maybe a fixed position in an information recording area (e.g., the start ofan information recording area). In this case, it is not necessary togenerate a pointer, and therefore, steps S1 and S2 can be omitted.

Further, a direction in which a search for unallocated areas isperformed is not limited to a direction from a sector having a smallsector number to a sector having a large sector number. A direction inwhich a search for unallocated areas is performed may be any directionas long as it is a fixed direction. For example, a direction in which asearch for unallocated areas is performed may be a direction from asector having a large sector number to a sector having a small sectornumber.

FIG. 5 shows an exemplary configuration of an informationrecording/reproduction apparatus according to the present invention.

The information recording/reproduction apparatus comprises a systemcontrol section 501, an optical disc drive 503, an input section 504(e.g., a mouse, a remote controller, etc.), an encoder 505 for digitallyencoding AV data, and a decoder 506 for converting encoded data to avideo/audio signal. These components are interconnected via an I/O bus502.

The system control section 501 comprises: a file management informationmemory 521 for retaining file management information read out from anoptical disc; an unallocated area memory 522 for retaining unallocatedarea-related information (e.g., unallocated area identifying informationfor identifying at least one unallocated area found by a search forunallocated areas); a recording buffer memory 523 for temporarilystoring data to be recorded onto an optical disc; a reproduction buffermemory 524 for temporarily retaining data read out from an optical disc;a file searching section 511 for searching for a new file usinginformation recorded in the file management information memory 521 inorder to generate a pointer as positional information for starting asearch for unallocated areas; a pointer generating section 512; anunallocated area searching section 513 for performing a search forunallocated areas from a position following a position indicated by apointer using information stored in an unallocated area memory 522; aninadequancy determining section 514 for determining whether or not atleast one unallocated area identified by the unallocated areaidentifying information is inadequate; a data recording section 515 forrecording data in the recording buffer memory 523 onto an optical disc;and a data reproducing section 516 for reading out data from an opticaldisc into the reproduction buffer memory 524.

The steps of the recording method shown in FIG. 4 are carried out by thesystem control section 501. For example, step S1 of FIG. 4 is carriedout by the file searching section 511, step S2 of FIG. 4 is carried outby the pointer generating section 512, step S3 of FIG. 4 is carried outby the unallocated area searching section 513 (the unallocated areaidentifying information is retained in the unallocated area memory 522),step S4 of FIG. 4 is carried out by the inadequancy determining section514, and step S5 of FIG. 4 is carried out by the data recording section515. The system control section 501 may be realized by, for example, amicroprocessor comprising a control program, a calculation memory, andthe like.

A video/audio signal is input into the encoder 505 from a tuner 531,such as a TV or the like. A signal converted by the decoder 506 may bereproduced by a TV 532.

Hereinafter, a method for searching a new file will be described.

FIG. 6 shows an exemplary structure of files recorded on an informationrecording medium, where ellipses represent directories and rectanglesrepresent files.

In the example of FIG. 6, five files are recorded in a Video directory.Files having an extension .MPG are real-time files which are compressedin the MPEG format. Files having an extension .IFO are control files inwhich control information, such as reproduction time information ofreal-time files or the like, is recorded. A control file may store editinformation indicating the order of reproduction operations of videoand/or audio data recorded in a real-time file. A file having anextension .IDX is an index file for managing information indicating alist of files recorded in a Video directory. An index file containsinformation indicating the file names and attributes of files recordedin a Video directory. A particular application, such as video recordingor the like, can obtain a list of files to be handled and theirattribute information by reading out an index file at first.

In the example of FIG. 6, four files are recorded in an Archivedirectory. Files recorded in an Archive directory are usual files. Forexample, a file having an extension .DOC is a document file.

A volume structure and a file structure formatted by UDF are based onthe standard ISO/IEC13346.

FIG. 7 shows a data structure of a file structure of FIG. 6 in a formatunder the standard ISO/IEC13346. In FIG. 7, FE represents a File Entryand FID represents a File Identifier Descriptor.

A volume structure 701 is used for recording volume managementinformation for logically handling an information recording medium. Thevolume structure 701 has location information for a space bit map 704indicating unallocated areas within an information recording area (e.g.,a partition) provided in a volume space, and location information forfile set descriptors for managing a root directory. However, for thesake of simplicity, file set descriptors are not shown in FIG. 7.

The space bit map 704 represents, with bits, whether or not each sectoris allocated for recording a predetermined data. A search forunallocated areas is performed by searching the space bit map 704. Itshould be noted that if a space bit map is not recorded, a search forunallocated areas can be performed by searching all informationindicating locations of files recorded on an optical disc.

File identifier descriptors are registered for each file recorded in thedirectory or for each directory. A file identifier descriptor contains afile name or a directory name and location information of acorresponding file entry. A recording location of file or directory dataor attribute information (e.g., its modification time or creation time,etc.) is recorded as a file entry.

A root directory 703 is managed by a file entry 702. The locationinformation of a file entry of a Video directory or an Archive directoryis managed using a file identifier descriptor in the root directory 703.The location information of a Video directory is managed by a file entry711. The location information of an Archive directory is managed by afile entry 721.

VIDEO.IDX, which has information indicating the recording location of afile, is managed by a file entry 713. The file entry 713 is managed by afile identifier descriptor in a Video directory 712. Similarly, fileentries 714, 715, 716, and 717 are managed by respective file identifierdescriptors in the Video directory 712.

File entries 723 to 726 of files registered in an Archive directory aremanaged by respective file identifier descriptors in a directory 722.

Thus, by recording file entries and directories while relating them toone another, the file structure of FIG. 6 can be managed. It should benoted that a file entry is recorded in a sector and a directory may berecorded in a sector if the number of file identifier descriptorsrecorded in the directory is small.

A search for a new file recorded in an information recording medium isachieved by tracking all file entries and directories to find a fileentry having the newest file modification time. Thus, by utilizing fileentries and directories, a file having the newest file modification timecan be regarded as a new file. By utilizing file management information,it is not necessary to record a pointer into an information recordingmedium and it is possible to use a standard file system without anyplace for storing pointers to implement a sequential recording method.It should be noted that instead of file modification time, file creationtime may be used as information for determining whether or not a file isa new file. In this case, a file search may be performed where a filehaving the newest file creation time is a new file. Alternatively, if aunique ID number (ID information), which is assigned to a file everytime the file is newly produced, is incremented, a file search may beperformed where a file having the largest ID number (ID information)assigned thereto is a new file.

Next, a method for searching for a new file when it is difficult tosearch the file entries of all files since there is a large number offiles recorded on an information recording medium, will be described.

In the case of the UDF format, an ID unique to a file is recorded in afile identifier descriptor as well as a file entry. In a search for anew file, a file managed by a file identifier descriptor having thelargest unique ID is searched for by tracking only directories withouttracking the file entry of each file, and a pointer is generated frominformation of the recording location of the file. In this searchmethod, the search range is decreased even if the number of files isincreased. Therefore, a time required to search for a new file can bereduced. For example, in the example of FIG. 7, a new file can besearched for by tracking up to the Video directory 712 and the Archivedirectory 722 instead of tracking all file entries.

When the number of directories is increased so that a long time isrequired to search directories, a pointer may be generated by searchingfiles in predetermined directories. For example, since MPEG filestypically have a large size, a directory in which MPEG files arerecorded is predetermined to be searched. In this case, by searchingonly files in the predetermined directory, a new file can be searchedfor at a higher speed. In the example of FIG. 7, a Video directory maybe predetermined as a directory in which a new file is searched for.

In the UDF format; a unique ID mapping data stream which manages theunique IDs of all files using a table is defined. The data stream can betracked with file set descriptors. When a data stream is recorded, thefile entry of a file indicated by an entry having the largest unique IDregistered in the data stream may be obtained and a pointer may begenerated from the recording location of the file indicated by the fileentry. According to this method, it is possible to generate a pointerwithout tracking files and directories.

Next, a recording method will be described, in which a pointer isgenerated which indicates a position other than the end position of filerecording, and data is recorded onto an information recording mediumusing the pointer. This is because if the number of random deletions ofvideo data recorded on an information recording medium is large, thenumber of rewrites in a particular area can be reduced more byperforming a search for unallocated areas from a random position on aninformation recording area than when a pointer for a search forunallocated areas is retained on an information recording medium in asequential recording method.

Specifically, it is assumed that in the recording method described inFIG. 1, the information recording area of the portion (a) of FIG. 1 hasnot been used. In this case, in the state of the portion (j) of FIG. 1,the numbers of data recordings in the areas A1, A2, A3, A4, A5, and A6are 3, 2, 2, 1, 2, and 1, respectively. The number of recordings in thearea A1 is larger than those of the other areas since data D1 and D7 arerecorded thereinto (later deleted by a user's instruction). Thus,despite the sequential recording, the number of recordings varies amongareas if the number of file recordings and the number of file deletionsare increased.

FIG. 8 is a diagram for explaining a recording method in which a pointerindicating a position other than the end position of file recording isgenerated and data is recorded onto an information recording mediumusing the pointer.

A portion (a) of FIG. 8 shows a search for unallocated areas which isperformed when an information recording medium in the state of theportion (h) of FIG. 1 is loaded into another recording apparatus. Inthis case, a search for unallocated areas does not begin from the end ofthe area A5 or the start of the information recording area, but apointer indicating any position in the information recording area isgenerated and the pointer is used to perform a search for unallocatedareas. Here, “any position” means a position which is randomlydetermined to be different from the previous position every time apointer is generated.

In the example of the portion (a) of FIG. 8, a pointer indicating theend of the area A3 is generated. The portion (b) of FIG. 8 shows anexample of the information recording medium in which data D11 isrecorded into the unallocated area A4 which has been randomlydetermined. In the state of the portion (b) of FIG. 8, the numbers ofrecordings into the areas A1, A2, A3, A4, A5, and A6 are 2, 2, 2, 2, 2,and 1, respectively. In this case, the number of data recordings intothe area A1 is reduced so that the number of data recordings can bedistributed throughout the information recording area.

It should be noted that a pointer used for a search for unallocatedareas may be generated using a random number whose seed is a currenttime or the like.

It should be noted that the timing of generating a pointer used for asearch for unallocated areas is not limited to a time when aninformation recording medium is loaded. A pointer may be generated at atime when a file is newly generated.

Next, a recording method using an index file according to the presentinvention will be described. The index file is used to manageinformation about a list of files handling a particular application,such as a video recorder or the like. When the application records,edits, or deletes a video clip, the index file is updated.

An information recording medium is used for a video camera recorder inthe following fashion, for example. Video data which is taken by a videocamera recorder is recorded onto an information recording medium.Returning to an office or home, the video data recorded on theinformation recording medium is dubbed onto other media and the videodata is then deleted from the information recording medium. Theinformation recording medium is loaded back to the video camera recorderfor taking other video.

FIG. 9 shows how data recording areas are changed on the informationrecording medium in the above-described application.

As shown in a portion (a) of FIG. 9, video data and management datathereof are recorded on a logically formatted information recordingmedium, where video data D1, its control data D2, video data D3, itscontrol data D4, and index file data D5 are recorded in this order onthe information recording medium. The data is file data as describedwith reference to FIG. 6. Specifically, the video data D1 and D3 arefile data 1001.MPG and 1002.MPG, respectively. The control data D2 andD4 are file data 1001.IFO and 1002.IFO, respectively.

A portion (b) of FIG. 9 shows that the video data and the control datathereof are dubbed onto other media and thereafter all of the data aredeleted. An index file VIDEO.IDX which manages a list of files recordedin a Video directory is updated. The updated index file is recorded intoa predetermined area on the information recording medium. Thepredetermined area is an area which is found by a search for unallocatedareas and is allocated for data recording.

When the information recording medium having the updated index file isloaded into a video camera recorder, the updated index file is thenewest file. Therefore, the updated index file is searched for as a newfile and a pointer indicating a position based on the end position ofthe recording area of the new file is generated. As a result, a searchfor unallocated areas can begin from a position following the endposition of the area in which the updated index file is recorded. Here,the name of a directory in which an index file is recorded ispredetermined (e.g., directory name “VIDEO”). The name of an index fileis also predetermined (e.g., extension name “.IDX”). Therefore, bytracking the directory tree of a file system, an index file can beeasily found. In an application such that video data recorded on aninformation recording medium is deleted and the information recordingmedium is reused, all data is deleted from an information recordingmedium after relevant data are dubbed onto other media and an index fileis updated and recorded, whereby sequential recording can be continuedwhile keeping the number of recordings uniform for areas in aninformation recording area.

Alternatively, an information recording medium is used for a videocamera recorder in the following fashion, for example. Video data whichis taken by a video camera recorder is recorded onto an informationrecording medium. Returning to an office or home, the video datarecorded on the information recording medium is dubbed onto other mediaand the information recording medium is then reformatted. Also in thiscase, as shown in the portion (b) of FIG. 9, an updated index file maybe recorded into a predetermined area on the information recordingmedium. Thereby, data can be recorded onto the information recordingmedium while avoiding areas from which data has been deleted.

The above-described recording method of the present invention whichavoids concentration of rewrites in recording of large-size data, suchas audio data or video data, is referred to as a circular recordingmethod.

It should be noted that a flash memory may be employed instead of theoptical disc drive 503. For example, flash memories, such as SD cardsand the like, have a smaller allowable number of rewrites than typicalSRAM memories. The recording method of the present invention can beapplied to such a recording medium.

FIG. 10 shows the internal structure of a typical flash memory card. Aflash memory card 550 can be connected to the I/O bus 502 (FIG. 5) ofthe system control section 501 (FIG. 5) via an interface, such as a USB,a CardBus, or the like. The flash memory card 550 comprises a controller551 which is realized by a CPU (e.g., a microcomputer, etc.) and amemory unit 552. The memory unit 552 comprises a plurality of physicalblocks. Data recording and reproduction in the memory unit 552 arecarried out in units of a physical block.

FIG. 11 shows a correspondence relationship between a logical space anda physical space comprising physical blocks, of a flash memory cardprovided to the system control section 501 (FIG. 5). Logical blocknumbers (LBNs) are assigned to the logical space. Physical block numbers(PBNs) are assigned to respective physical blocks in the physical space.Here, the size of a logical block is the same as the size of a physicalblock. Correspondence information of the physical blocks and the logicalblocks is managed by the controller 551. The size of the logical spaceis predetermined to be smaller than the size of the physical space. Thesize of an additional block is a spare size of the physical space. Thecontroller 551 is designed so that an optimal block among unused deletedblocks can be allocated to a logical block. For example, when the systemcontrol section 501 instructs, three times, that data is recorded in toa logical block LBa, the controller 551 first allocates a physical blockPBa to the logical block LBa and records data thereinto, and thereafter,allocates a physical block PBb to the logical block LBa and records datathereinto, and finally allocates a physical block PBa to the logicalblock LBa and records data thereinto. Thus, data recording can becarried out three times without recording the data into the same block.This can be achieved by providing an additional block having a sizelarger than the size of the logical block.

FIG. 12 shows a correspondence relationship between a logical space anda physical space of a flash memory card when large data, such as videodata, is recorded onto the flash memory card. For example, the size of amemory unit of the flash memory card is 146 MB×7, and the size of videodata to be recorded and the size of an additional block are each 146 MB.For the sake of simplicity, the size of the logical block and the sizeof the physical block are each 146 MB. When data D1 to D6 are recordedin sequence, physical blocks PB1, PB3, PB2, PB4, PB5, and PB6 areassociated with logical blocks LB1, LB2, LB3, LB4, LB5, and LB6,respectively. The physical block PB7 is unused, which is a recordabledeleted block. When the size of data to be recorded is almost the sameas the size of the additional block, there are a small number ofphysical block options which can be allocated by the controller 551.

FIG. 13 shows a difference between a recording method of the presentinvention and a conventional recording method with respect to a flashmemory card. Portions (a), (b), and (c) of FIG. 13 show the conventionalrecording method. Portions (d), (e), and (f) of FIG. 13 show therecording method of the present invention.

The portion (a) of FIG. 13 shows a state of the flash memory card wherean instruction to record data D7 into a logical block LB1 is given tothe flash memory card of FIG. 12. Since the physical block PB7 isunused, the controller 551 allocates the physical block PB7 to thelogical block LB1, and records data into the physical block PB7. Thephysical block PB1 was allocated to the logical block LB1 before datarecording. Therefore, after data recording, the controller 551 managesthe physical block PB1 as a deleted block.

The portion (b) of FIG. 13 shows a state of the flash memory card wherean instruction to record data D8 to the logical block LB1 is given tothe flash memory card of the portion (a) of FIG. 13. Data is recordedinto the unused physical block PB1. The physical block PB1 is allocatedto the logical block LB1. The physical block PB7 is managed as a deletedblock by the controller 551.

The portion (c) of FIG. 13 shows a state of the flash memory card wherean instruction to record data D9 into the logical block LB1 is given tothe flash memory card of the portion (b) of FIG. 13. Data D9 is recordedinto the deleted physical block PB7. The physical block PB7 is allocatedto the logical block LB1, and the physical block PB1 is managed as adeleted block by the controller 551.

Thus, if a control system instructs recording into the same logicalblock, the controller 551 can allocate only an unused physical block asa recording area, so that data is inevitably recorded into the physicalblock PB1 or PB7 alternately.

It is now assumed that in the portion (a) of FIG. 13, data D1, D2 and D3are deleted before giving an instruction to record data D7. In thiscase, it is not known in the physical space that the data D1, D2 and D3has been deleted. Therefore, the correspondence relationship betweenphysical blocks and logical blocks managed by the controller 551 is notchanged. This is because data recorded in a flash memory is managed by afile system having a File Allocation Table (FAT) format, and therefore,deletion of data is recorded in the FAT. Typically, in the FAT filesystem, a blank area is searched for from an area having a smallerlogical block number and new data is recorded into the blank area.Therefore, even if blank areas are present In a plurality of areas in alogical space, data is recorded into an area having a smaller logicalblock number with higher precedence as shown in the portions (a) to (c)of FIG. 13. Therefore, in the illustrated example, data is recordedalternately into two areas (physical blocks PB1 and PB7).

The portion (d) of FIG. 13 shows a state of the flash memory card thatdata D1, D2, and D3 are logically deleted and data D7 is recorded intothe logical block LB1 in the flash memory card of FIG. 12, where thecorrespondence between logical blocks and physical blocks is the same asthat which is shown in the portion (a) of FIG. 13.

The portion (e) of FIG. 13 shows a state of the flash memory card wheredata D8 is recorded into the logical block LB2 in the flash memory cardof the portion (d) of FIG. 13. Data is recorded into the unused physicalblock PB1. The physical block PB1 is allocated to the logical block LB2,and the physical block PB3 is managed as a deleted block by thecontroller 551.

The portion (f) of FIG. 13 shows a state of the flash memory card wheredata D9 is further recorded into the logical block LB3 in the flashmemory card of the portion (e) of FIG. 13. Data is recorded into thedeleted physical block PB3. The physical block PB3 is allocated to thelogical block LB3, and the physical block PB2 is managed as a deletedblock by the controller 551.

As described with reference to the portions (d) to (f) of FIG. 13, byusing the sequential recording method, the controller 551 can recorddata into the physical blocks PB7, PB1, and PB3, whereby data can berecorded into different areas sequentially while avoiding recording datainto two areas alternately.

As described above, when the size of data to be recorded is sufficientlysmaller than the size of an additional block, a controller in a flashmemory card allocates a different unused physical block to a logicalblock, thereby substantially preventing a problem from arising in thenumber of rewrites. However, when the size of data to be recorded cannotbe sufficiently small, or is larger, as compared to the size of anadditional block, it is difficult for the controller in the flash memoryto avoid concentration of rewrites. In this case, by employing thesequential recording method, it is possible to reduce physical blockfatigue due to rewrite fatigue.

It will be clearly understood that the recording method of the presentinvention can be applied to a flash memory card comprising a pluralityof memory units or a PC card comprising a plurality of flash memories.

It should be noted that in flash memories, an ECC block typicallyconsists of a block or a sector, but an ECC block may comprise aplurality of blocks or a plurality of sectors. In this case, bysearching for unallocated areas from the end of an ECC block containingthe end position of an area in which a new file is recorded, the numberof rewrites in an ECC block can be reduced.

INDUSTRIAL APPLICABILITY

According to the present invention, a new search for unallocated areasis not performed until all of at least one unallocated area found by theprevious search for unallocated areas is used. Thereby, it is possibleto avoid concentration of rewrites in a particular area while avoidingrewriting data into an area from which data has been deleted. Accordingto the present invention, even if an unallocated area is newly generatedby deleting a new file, a new search for unallocated areas is notperformed until all of the previously found unallocated areas are used.Thereby, it is possible to avoid rewriting of data into an area fromwhich a file has been deleted. In addition, by performing a search forunallocated areas from a sector following the end position of an ECCblock containing the end position of an area, in which data is recorded,on an ECC block-by-ECC block basis, it is possible to prevent rewritingof an ECC block at the end position of data in an information recordingmedium into which data is recorded using ECC blocks. In addition, byperforming a search for unallocated areas from a sector following theend position of the recording position of a new file, the sequentialrecording method can be implemented in a file system which does not havea data structure for recording a position from which a search forunallocated areas begins. In addition, by searching unallocated areasfrom a random position in an information recording area, it is possibleto prevent concentration of rewrites on a particular area in aninformation recording medium which data is frequently recorded into ordeleted from.

Moreover, the recording method of the present invention can be appliedto optical discs or flash memories, which have a smaller allowablenumber of rewrites than that of hard disks or the like, to achieve theabove-described effects. Therefore, the present invention is useful as arecording method, a recording apparatus, and the like.

1. A recording method for recording data into an information recordingmedium, wherein the number of data rewrites into the same area islimited, the recording method comprising the steps of: (a) performing asearch for unallocated areas in an information recording area andretaining, in a memory, unallocated area identifying information foridentifying at least one unallocated area found by the search; (b)determining whether or not an unallocated area satisfying a recordrequest is present among the at least one unallocated areas identifiedby the unallocated area identifying information; and (c) when anunallocated area satisfying a record request is present among the atleast one unallocated areas identified by the unallocated areaidentifying information, allocating the unallocated area as an area forrecording data and recording data into the allocated area.
 2. Arecording method according to claim 1, further comprising the steps of:(d) when an unallocated area satisfying a record request is not presentamong the at least one unallocated areas identified by the unallocatedarea identifying information, returning to step (a).
 3. A recordingmethod according to claim 1, further comprising the steps of: (e)searching for a new file recorded in the information recording area; and(f) generating a pointer indicating a position based on an end positionof an area in which the new file is recorded, wherein the search forunallocated areas in the information recording area in step (a) isperformed in a fixed direction from a position following the positionindicated by the pointer.
 4. A recording method according to claim 3,wherein the data is recorded into the information recording medium on anECC block-by-ECC block basis, the ECC block comprises a plurality ofsectors, and the search for unallocated areas in the informationrecording area is performed on an ECC block-by-ECC block basis.
 5. Arecording method according to claim 3, wherein the pointer indicates anend position of an ECC block containing the end position of the area inwhich the new file is recorded.
 6. A recording method according to claim3, wherein step (e) comprises searching files recorded in theinformation recording medium for a file having the newest file creationtime or modification time as the new file. 7 A recording methodaccording to claim 3, wherein step (e) comprises searching filesrecorded in the information recording medium for a file having thelargest ID number assigned to the file as the new file.
 8. A recordingmethod according to claim 3, wherein step (e) comprises searching filesrecorded in a particular directory for a file most recently recorded inthe information recording medium as the new file.
 9. A recording methodaccording to claim 3, wherein step (e) comprises searching for an indexfile as the new file, wherein the index file is used to manageinformation about a list of files recorded in the information recordingmedium.
 10. A recording method according to claim 9, further comprisingthe steps of: (g) updating the index file when data recorded in theinformation recording medium is deleted or when the informationrecording medium is formatted; and (h) recording the updated index fileinto the area allocated in step (c).
 11. A recording method according toclaim 1, further comprising the step of: (i) generating a pointerindicating a random position in the information recording area, whereinthe search for unallocated areas in the information recording area instep (a) is performed from a position following the position indicatedby the pointer in a fixed direction.
 12. A recording method according toclaim 1, wherein the search for unallocated areas in the informationrecording area in step (a) is performed from a start of the informationrecording area in a fixed direction.
 13. A recording apparatus forrecording data into an information recording medium, wherein the numberof data rewrites into the same area is limited, the recording apparatuscomprising: a holding section for performing a search for unallocatedareas in an information recording area and retaining, in a memory,unallocated area identifying information for identifying at least oneunallocated area found by the search; a determining section fordetermining whether or not an unallocated area satisfying a recordrequest is present among the at least one unallocated areas identifiedby the unallocated area identifying information; and a recording sectionfor, when an unallocated area satisfying a record request is presentamong the at least one unallocated areas identified by the unallocatedarea identifying information, allocating the unallocated area as an areafor recording data and recording data into the allocated area.
 14. Arecording apparatus according to claim 13, wherein when an unallocatedarea satisfying a record request is not present among the at least oneunallocated areas identified by the unallocated area identifyinginformation, the holding section performs a search for unallocated areasin the information recording area and retains, in the memory,unallocated area identifying information for identifying at least oneunallocated area found by the search.